package com.wkbb.sports.dto;

import java.text.NumberFormat;

import lombok.Data;

@Data
public class ProjectTrainDescriptionDto {
	
	private int id;
	
	private String name;
	
	private String color;
	
	private int nan;
	
	private int nv;
	
	private String num;
	
	public ProjectTrainDescriptionDto(int id, String name, String color) {
		this.id = id;
		this.name = name;
		this.color = color;
	}
	
	public void buildNum(int total) {
		double sum = nan + nv;
		num = NumberFormat.getPercentInstance().format(sum / total);
	}
}
